package performance;

import java.util.Collection;

import org.javanum.number.Complex;

public class ComplexAdditionRuntimeTest extends ComplexRuntimeTest {

	@Override
	public void runTest(DataCollector<Long> resultCatcher) {
		Collection<Complex> data = generateData();
		long startTime;
		long endTime;
		
		for(Complex complex1:data){
			for(Complex complex2:data){
				startTime = System.currentTimeMillis();
				complex1.add(complex2);
				endTime = System.currentTimeMillis();
				resultCatcher.collectData(endTime-startTime);
			}
		}
	}

}
